<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
	<div id="div1" :title="age+'岁'" :style="style" :class="class_arr">
		name:{{name}} <br>
		age:{{age}} <br>	
		birth:{{calcBirth()}}
		<img    :src="url" alt="">
	</div>
	
	<script type="text/javascript">
		let vm = new Vue({
			el:'#div1',
			data:{
				name:'blue',
				age:18,
				url:'http://lib.kaikeba.com/course/java/images/page-man.jpg',
				style:{color:'red'},
				class_arr:['a','b']
			},
			methods:{
				calcBirth(){
					return new Date().getFullYear()-this.age;
				}
			}
		});
	</script>
</body>
</html>